{smcl}
{txt}{sf}{ul off}{.-}
      name:  {res}<unnamed>
       {txt}log:  {res}C:\Users\feder\Documents\Import Monopolization Replication\do\..\output\logfiles\graph_1A_1B.smcl
  {txt}log type:  {res}smcl
 {txt}opened on:  {res}16 May 2025, 16:04:29
{txt}
{com}. 
. ************ Figures
. 
. use  ..\temp\trade_data_h6_covars_h1.dta, clear
{txt}
{com}. set scheme s1mono
{txt}
{com}. rename tf_best_adv tf
{res}{txt}
{com}. 
. gen B1_hs6_ln = ln(B1_hs6)
{txt}(122,421 missing values generated)

{com}. bys c y: egen v_tot = total(v)
{txt}
{com}. gen share_weight = v/v_tot
{txt}(122,421 missing values generated)

{com}. 
. gen B1_hs6_ln_weight = B1_hs6_ln*share_weight
{txt}(122,421 missing values generated)

{com}. drop if B1_hs6_ln_weight==.
{txt}(122,421 observations deleted)

{com}. 
. gen ntm_weight = ntm_EF*share_weight
{txt}(1,867,136 missing values generated)

{com}. 
. collapse (mean) commodity_exports_orig B1_hs6 B1_hs6_ln tariff_wdi  ntm_EF (sum) B1_hs6_ln_weight ntm_weight, by(c y) 
{res}{txt}
{com}. 
. collapse (mean) commodity_exports_orig B1_hs6_ln_weight  tariff_wdi ntm_weight ntm_EF , by(c) 
{res}{txt}
{com}. 
. *Import concentration
. loc run = 1
{txt}
{com}. if `run' == 1{c -(}
. regress B1_hs6_ln_weight commodity_export, r

{txt}Linear regression                               Number of obs     = {res}        52
                                                {txt}F(1, 50)          =  {res}    16.50
                                                {txt}Prob > F          = {res}    0.0002
                                                {txt}R-squared         = {res}    0.2592
                                                {txt}Root MSE          =    {res} .34334

{txt}{hline 23}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 24}{c |}{col 36}    Robust
{col 1}      B1_hs6_ln_weight{col 24}{c |} Coefficient{col 36}  std. err.{col 48}      t{col 56}   P>|t|{col 64}     [95% con{col 77}f. interval]
{hline 23}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
commodity_exports_orig {c |}{col 24}{res}{space 2} .8283855{col 36}{space 2} .2039544{col 47}{space 1}    4.06{col 56}{space 3}0.000{col 64}{space 4}  .418731{col 77}{space 3}  1.23804
{txt}{space 17}_cons {c |}{col 24}{res}{space 2} 6.838907{col 36}{space 2} .1073262{col 47}{space 1}   63.72{col 56}{space 3}0.000{col 64}{space 4} 6.623336{col 77}{space 3} 7.054478
{txt}{hline 23}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{com}. twoway (scatter B1_hs6_ln_weight commodity_export, mstyle(none) mlabel(c))  (lfit B1_hs6_ln_weight commodity_export) , legend(off) xtitle("Commodity export share of total merchandise exports") ytitle("Average HHI of country's import markets") graphregion(color(white)) ylabel(6.9077553 "1000" 7.6009025 "2000" 8.0063676 "3000") plotregion( lcolor(white))
{res}{com}. graph export ..\output\Graph_1A_alt.png, as(png) replace
{txt}{p 0 4 2}
file {bf}
..\output\Graph_1A_alt.png{rm}
saved as
PNG
format
{p_end}
{com}. graph export ..\output\Graph_1A_alt.pdf, as(pdf) replace
{txt}{p 0 4 2}
file {bf}
..\output\Graph_1A_alt.pdf{rm}
saved as
PDF
format
{p_end}
{com}. {c )-}
{txt}
{com}. 
. *Trade protection
. loc run = 1
{txt}
{com}. if `run' == 1{c -(}
. replace tariff_wdi = tariff_wdi/100
{txt}(52 real changes made)
{com}. regress tariff_wdi  commodity_export, r

{txt}Linear regression                               Number of obs     = {res}        52
                                                {txt}F(1, 50)          =  {res}     2.95
                                                {txt}Prob > F          = {res}    0.0919
                                                {txt}R-squared         = {res}    0.0587
                                                {txt}Root MSE          =    {res} .03707

{txt}{hline 23}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 24}{c |}{col 36}    Robust
{col 1}            tariff_wdi{col 24}{c |} Coefficient{col 36}  std. err.{col 48}      t{col 56}   P>|t|{col 64}     [95% con{col 77}f. interval]
{hline 23}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
commodity_exports_orig {c |}{col 24}{res}{space 2}  .037763{col 36}{space 2}  .021976{col 47}{space 1}    1.72{col 56}{space 3}0.092{col 64}{space 4} -.006377{col 77}{space 3} .0819031
{txt}{space 17}_cons {c |}{col 24}{res}{space 2} .0477678{col 36}{space 2} .0126829{col 47}{space 1}    3.77{col 56}{space 3}0.000{col 64}{space 4} .0222934{col 77}{space 3} .0732423
{txt}{hline 23}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{com}. twoway (scatter tariff_wdi commodity_export, mstyle(none) mlabel(c))  (lfit tariff_wdi  commodity_export) , legend(off) ytitle("Tariff rate, applied, weighted mean, all products") xtitle("Commodity export share of total merchandise exports") graphregion(color(white))  plotregion( lcolor(white))
{res}{com}. graph export ..\output\Graph_1B_alt.png, as(png) replace
{txt}{p 0 4 2}
file {bf}
..\output\Graph_1B_alt.png{rm}
saved as
PNG
format
{p_end}
{com}. graph export ..\output\Graph_1B_alt.pdf, as(pdf) replace
{txt}{p 0 4 2}
file {bf}
..\output\Graph_1B_alt.pdf{rm}
saved as
PDF
format
{p_end}
{com}. {c )-}
{txt}
{com}. 
. 
. 
. 
. log close
      {txt}name:  {res}<unnamed>
       {txt}log:  {res}C:\Users\feder\Documents\Import Monopolization Replication\do\..\output\logfiles\graph_1A_1B.smcl
  {txt}log type:  {res}smcl
 {txt}closed on:  {res}16 May 2025, 16:04:40
{txt}{.-}
{smcl}
{txt}{sf}{ul off}